package com.kelaite.procurement.dto;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

public class PipelinePublicDTO {

	private Long id;

	private PipelineHeaderDTO tPipelineHeader;

	private VendorDTO tVendor;

	private Long bidPrice;

	private Integer tecMark;

	private Integer commMark;

	private Integer compMark;

	private boolean suggestedWin;

	private boolean finalWin;

	private Date gmtCreateTime;

	private Date gmtUpdateTime;

	private String createdBy;

	private String updatedBy;

	private boolean isDelete;

	private boolean isCreateContract;

	// /////////////////////////////////////
	private String winFlag;

	private Long pipelineHeaderId;

	public String getWinFlag() {

		return winFlag;
	}

	public void setWinFlag(String winFlag) {

		this.winFlag = winFlag;
		if (StringUtils.equalsIgnoreCase("o", this.winFlag)
				|| StringUtils.equalsIgnoreCase("on", this.winFlag)) {
			this.setFinalWin(true);
			this.setSuggestedWin(true);
		}
	}

	public Long getId() {

		return id;
	}

	public void setId(Long id) {

		this.id = id;
	}

	public PipelineHeaderDTO gettPipelineHeader() {

		return tPipelineHeader;
	}

	public void settPipelineHeader(PipelineHeaderDTO tPipelineHeader) {

		this.tPipelineHeader = tPipelineHeader;
	}

	public VendorDTO gettVendor() {

		return tVendor;
	}

	public void settVendor(VendorDTO tVendor) {

		this.tVendor = tVendor;
	}

	public Long getBidPrice() {

		return bidPrice;
	}

	public void setBidPrice(Long bidPrice) {

		this.bidPrice = bidPrice;
	}

	public Integer getTecMark() {

		return tecMark;
	}

	public void setTecMark(Integer tecMark) {

		this.tecMark = tecMark;
	}

	public Integer getCommMark() {

		return commMark;
	}

	public void setCommMark(Integer commMark) {

		this.commMark = commMark;
	}

	public Integer getCompMark() {

		return compMark;
	}

	public void setCompMark(Integer compMark) {

		this.compMark = compMark;
	}

	public boolean getSuggestedWin() {

		return suggestedWin;
	}

	public void setSuggestedWin(boolean suggestedWin) {

		this.suggestedWin = suggestedWin;
	}

	public boolean getFinalWin() {

		return finalWin;
	}

	public void setFinalWin(boolean finalWin) {

		this.finalWin = finalWin;
	}

	public Date getGmtCreateTime() {

		return gmtCreateTime;
	}

	public void setGmtCreateTime(Date gmtCreateTime) {

		this.gmtCreateTime = gmtCreateTime;
	}

	public Date getGmtUpdateTime() {

		return gmtUpdateTime;
	}

	public void setGmtUpdateTime(Date gmtUpdateTime) {

		this.gmtUpdateTime = gmtUpdateTime;
	}

	public String getCreatedBy() {

		return createdBy;
	}

	public void setCreatedBy(String createdBy) {

		this.createdBy = createdBy;
	}

	public String getUpdatedBy() {

		return updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {

		this.updatedBy = updatedBy;
	}

	public boolean isDelete() {

		return isDelete;
	}

	public void setDelete(boolean isDelete) {

		this.isDelete = isDelete;
	}

	public boolean isCreateContract() {

		return isCreateContract;
	}

	public void setCreateContract(boolean isCreateContract) {

		this.isCreateContract = isCreateContract;
	}

	public Long getPipelineHeaderId() {

		return pipelineHeaderId;
	}

	public void setPipelineHeaderId(Long pipelineHeaderId) {

		this.pipelineHeaderId = pipelineHeaderId;
	}

	@Override
	public String toString() {

		return "PipelinePublicDTO [id=" + id + ", tPipelineHeader="
				+ tPipelineHeader + ", tVendor=" + tVendor + ", bidPrice="
				+ bidPrice + ", tecMark=" + tecMark + ", commMark=" + commMark
				+ ", compMark=" + compMark + ", suggestedWin=" + suggestedWin
				+ ", finalWin=" + finalWin + ", gmtCreateTime=" + gmtCreateTime
				+ ", gmtUpdateTime=" + gmtUpdateTime + ", createdBy="
				+ createdBy + ", updatedBy=" + updatedBy + ", isDelete="
				+ isDelete + ", isCreateContract=" + isCreateContract
				+ ", winFlag=" + winFlag + ", pipelineHeaderId="
				+ pipelineHeaderId + "]";
	}

}
